home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Directorty Opus 5 - Magellan 2
/
Opus 5 - Magellan 2.iso
/
Extras
/
TwinOpus2
/
REXX
/
DOpus
/
MakeDir.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-10-13
|
2KB
|
77 lines
/*
*
* Makes a directory with TwinExpres from DOpus.
*
* (c) 1994 by K.P. van Beem (2:280/464.2, patrick.van.beem@aobh.xs4all.nl)
*
* Based on the DOpusLhaARexx package by Geoff Seeley (but you can better
* use GuiArc in stead of DOpus and a script, to deal with archives)
*
*/
DOpusPort = 'DOPUS.1'
if ~show(l,"rexxsupport.library") then
call addlib("rexxsupport.library",0,-30,0)
if showlist('Ports', DOpusPort) = 0 then do
say 'Directory Opus Arexx port not found. Aborting.'
call CleanUp
end
address 'DOPUS.1'
options results
/* setup DOpus window and tell user what's happening */
Busy on
TopText "Creating (sub)directory..."
/* Get the current path to create the dir */
'Status 6 -1'
GetEntry Result
FilePath = Result
if left(FilePath,1) != '*' then do
TopText "You are not in a Twin directory."
call CleanUp
end
/* Get the name of the directory to create */
getstring '"Enter Directory Name"'
Directory = Result
if Directory="" | rc~=0 then do
TopText "You have to specify a directory."
call CleanUp
end
if right(FilePath,1) = ':' then
FilePath = FilePath || Directory
else
FilePath = FilePath || '/' || Directory
address command 'echo >PPipe: MkDir' Quote(FilePath)
TopText "Ready"
'DisplayDir -1'
address AREXX "Rexx:DOpus/Reread.rexx"
call CleanUp
exit
/*---------------------------------------------------------------------------*/
CleanUp: /* Remove any files and exit */
Busy off
exit
return
/*--------------------------------------------------------------------------*/
Quote: procedure /* add quotes to string */
parse arg string
return '"'||string||'"'